package lzy.service.impl;
import lzy.entity.Batch;
import lzy.mapper.BatchMapper;
import lzy.service.BatchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class BatchServiceImpl implements BatchService {
    @Autowired
    private BatchMapper batchMapper;

    @Override
    public List<Batch> findAll() {
        return batchMapper.findAll();
    }
    @Override
    public Batch findByBatchNo(String batchNo) {
        return batchMapper.findByBatchNo(batchNo);
    }
    @Override
    public void save(Batch batch) {
        batchMapper.insert(batch);
    }
    @Override
    public void update(Batch batch) {
        batchMapper.update(batch);
    }
    @Override
    public void delete(String batchNo) {
        batchMapper.delete(batchNo);
    }
    @Override
    public int sumInitParamCountToday() {
        return batchMapper.sumInitParamCountToday();
    }
    @Override
    public int countBatchCheckedIn7Days() {
        return batchMapper.countBatchCheckedIn7Days();
    }
    @Override
    public int countAllChecked() {
        return batchMapper.countAllChecked();
    }
    @Override
    public int countAll() {
        return batchMapper.countAll();
    }
    @Override
    public List<String> findBatchNosWithNullStatus() {
        return batchMapper.findBatchNosWithNullStatus();
    }
} 